package cn.edu.xmist.expression;

/**
 * 游戏元素基类
 */
public abstract class AbstractPicture {
	// 坐标x, y 宽高width, height
	public int x;
	public int y;
	public int width;
	public int height;

	/**
	 * 有参构造方法
	 * @param x
	 * @param y
	 */
	public AbstractPicture(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	public int getX() { return x; }
	
	public int getY() { return y; }
	
	public int getWidth() { return width; }
	
	public int getHeight() { return height; }

	/**
	 * 无参构造
	 */
	public AbstractPicture() {}
	/**
	 * 绘制
	 */
	protected abstract void draw();
	
	/**
	 * 定义排序规则
	 * @return
	 */
	protected int getOrder() {
		return 0;
	}
}
